/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package game;

import framework.GMouseManager;
import framework.GObject;

/**
 *
 * @author bryan
 */
public class Mallet extends GObject{
   
   public Mallet() {
      String filename[] = new String[2];
      for(int i = 0; i < 2;i++) {
         filename[i] = "images/mal" + i + ".png";
      }
      try {
         this.loadImage(filename);
      }catch(Exception e) {
         e.printStackTrace();
      }
      this._img = this._sprites[0];
      this._x = 0;
      this._y = 0;
   }
   
   public void animate() {
      this._x = GMouseManager.X - 40;
      this._y = GMouseManager.Y - 150;
      if(GMouseManager.PRESS) {
         this._img = this._sprites[1];
      } else {
         this._img = this._sprites[0];
      }
      
   }
   
}
